home *** CD-ROM | disk | FTP | other *** search
/ Openstep 4.2 (Developer) / Openstep Developer 4.2.iso / NextDeveloper / Examples / DriverKit / AMDPCSCSIDriver / AMDPCSCSIDriver_reloc.tproj / AMD_Chip.h next >
Encoding:
C/C++ Source or Header  |  1996-04-03  |  1.8 KB  |  82 lines

  1. /*     Copyright (c) 1994-1996 NeXT Software, Inc.  All rights reserved. 
  2.  *
  3.  * AMD_Chip.h - chip (53C974/79C974) specific methods for AMD SCSI driver
  4.  *
  5.  * HISTORY
  6.  * 21 Oct 94    Doug Mitchell at NeXT
  7.  *      Created. 
  8.  */
  9.  
  10. #import "AMD_SCSI.h"
  11. #import "AMD_Types.h"
  12.  
  13. @interface AMD_SCSI(Chip)
  14.  
  15. /*
  16.  * Public methods called by other categories of AMD_SCSI.
  17.  */
  18.  
  19. /*
  20.  * One-time-only init and probe. Returns YES if a functioning chip is 
  21.  * found, else returns NO. -hwReset must be called subsequent to this 
  22.  * to enable operation of the chip.
  23.  */ 
  24. - (BOOL)probeChip;
  25.  
  26. /*
  27.  * Reusable 53C974 init function. This includes a SCSI reset.
  28.  * Handling of ioComplete of active and disconnected commands must be done
  29.  * elsewhere. Returns non-zero on error. 
  30.  */
  31. - (int)hwReset : (const char *)reason;
  32.  
  33. /*
  34.  * reset SCSI bus.
  35.  */
  36. - (void)scsiReset;
  37.  
  38. /*
  39.  * Prepare for power down. 
  40.  */
  41. - (void) powerDown;
  42.  
  43. /*
  44.  * Return values from -hwStart.
  45.  */
  46. typedef enum {
  47.     HWS_OK,            // command started successfully
  48.     HWS_REJECT,        // command rejected, try another
  49.     HWS_BUSY,        // hardware not ready for command
  50. } hwStartReturn;
  51.  
  52. /*
  53.  * Start a SCSI transaction for the command in activeCmd. ActiveCmd must be 
  54.  * NULL. A return of HWS_REJECT indicates that caller may try again
  55.  * with another command; HWS_BUSY indicates a condition other than
  56.  * (activeCmd != NULL) which prevents the processing of the command. The
  57.  * command will have been enqueued on pendingQ in the latter case. The
  58.  * command will have been ioComplete'd in the HWS_REJECT case.
  59.  */
  60. - (hwStartReturn)hwStart : (commandBuf *)cmdBuf;
  61.  
  62. /*
  63.  * SCSI device interrupt handler.
  64.  */
  65. - (void)hwInterrupt;
  66.  
  67. - (void)logRegs;
  68.  
  69. @end
  70.  
  71. extern IONamedValue scsiMsgValues[];
  72.  
  73. #ifdef    DDM_DEBUG
  74. extern IONamedValue scsiPhaseValues[];
  75. #endif    DDM_DEBUG
  76.  
  77. #ifdef    DEBUG
  78. extern IONamedValue scStateValues[];
  79. #endif    DEBUG
  80.  
  81. /* end of AMD_Chip.h */
  82.